package visitor;

import model.PaperSelection;
import model.Student;
import paper.Paper;

import java.util.List;
import java.util.Map;

public class SelectedCountVisitor implements PaperSelectionVisitor {
    private int count = 0;

    @Override
    public void visit(PaperSelection selection) {
        for (Map.Entry<Student, List<Paper>> entry : selection.getSelections().entrySet()) {
            if (!entry.getValue().isEmpty()) count++;
        }
    }

    public int getCount() {
        return count;
    }
}
